// -*- coding: utf-8 -*- 
/**
 * Project: AlgorithmsLearn
 *
 * @author: yanking
 * Create time: 2022-04-03 00:12
 * IDE: IntelliJ IDEA
 * Introduction:
 */
package com.LeetCodeT.DateTrain;

import java.util.TreeMap;

public class NextGreatestLetter {
    /**
     * 寻找比目标字母大的最小字母，循环出现
     */
    public char nextGreatestLetter(char[] letters, char target) {
        int n = letters.length;

        for (char letter : letters) {
            if (letter > target) {
                return letter;
            }
        }
        TreeMap<Integer, Integer> tm = new TreeMap<>();
        return letters[0];


    }
}
